from utils import xprimes 

primes = set(xprimes(100000))
twicesquare = [2*i**2 for i in range(1000)]

for i in range(33, 1000000, 2):
    if i in primes:
        continue
    flag = True
    for  j in twicesquare:
        if j >= i:
            break
        if i-j in primes:
            flag = False
            break
    if flag:
        print i
        break
       


